package ooday03;

public class AnTest {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[3];
        dogs[0] = new Dog("小黑",1,"黑","泰迪","骨头");
        dogs[1] = new Dog("小白",2,"白","边牧","牛奶");
        dogs[2] = new Dog("小灰",3,"灰","巴哥","狗粮");
        System.out.println(dogs[0].name);
        dogs[1].age = 4;
        System.out.println(dogs[1].age);
        dogs[2].swim();
        for (int i = 0; i <dogs.length ; i++) {
            System.out.println(dogs[i].name);
            dogs[i].swim();
        }

        Chick[] chick = new Chick[2];
        chick[0] = new Chick("小公鸡",1,"黑",'公');
        chick[1] = new Chick("小母鸡",2,"黑",'母');
        chick[0].age = 3;
        System.out.println(chick[0].age);

        Fish[] fish = new Fish[4];
        fish[0] = new Fish("小红鱼",1,"红");
        fish[1] = new Fish("小黄鱼",1,"黄");
        fish[2] = new Fish("小黑鱼",1,"红");
        fish[3] = new Fish("小灰鱼",1,"红");
        fish[0].eat();








/*        Dog xh = new Dog("小黄",3,"白","泰迪","骨头");
        xh.lookHome();
        xh.drink();
        xh.eat();
        xh.swim();

        Chick xhj = new Chick("小黄鸡",2,"黄",'公');
        xhj.agg();
        xhj.eat();

        Fish xby = new Fish();
        xby.name = "小白鱼";
        xby.eat();
        xby.drink();

        Fish xhy = new Fish("小红鱼",1,"红");
        xhy.eat();
        xhy.swim();*/
    }
}
